import { FC } from 'react'

const Detail: FC<any> = (props: any) => {
    console.log(props);
    if (props.match.params.id === 'apple') {
        return (
            <fieldset>
                <legend>苹果</legend>
                <h1>
                    <img src="https://img1.baidu.com/it/u=821717066,3093366303&fm=253&fmt=auto&app=138&f=JPEG?w=752&h=500" alt="" />
                </h1>
            </fieldset>
        )
    }else if(props.match.params.id === 'banana'){
        return (
            <fieldset>
                <legend>香蕉</legend>
                <h1>
                    <img src="https://img0.baidu.com/it/u=3420484142,1981428872&fm=253&fmt=auto&app=120&f=JPEG?w=640&h=424" alt="" />
                </h1>
            </fieldset>
        )
    }else{
        return (
            <fieldset>
                <legend>橘子</legend>
                <h1><img src="https://img1.baidu.com/it/u=1405679387,2768717484&fm=253&fmt=auto&app=138&f=JPEG?w=576&h=500" alt="" /></h1>
            </fieldset>
        )
    }
}
export default Detail